package com.digitalart.section.index
{
	import flash.events.Event;
	import com.digitalart.section.Section;

	public class Index extends Section
	{
		private var _indexController:IndexController;
		
		/**********************************Constructor*************************/
		
		public function Index(){
			super();
		}
		
		
		/**********************************************************************/
		
		/**********************************Methods*************************/
		
		override public function load():void{
			
			_indexController = new IndexController();
			_indexController.addEventListener(IndexController.INDEX_READY, onLoadComplete);
			_indexController.init();
			
		}
		override public function onLoadComplete(event : Event) : void {
			_indexController.removeEventListener(IndexController.INDEX_READY, onLoadComplete);
			
			this.addChild(_indexController.getView());
			dispatchEvent(new Event(Section.ON_LOAD_COMPLETE));
		}
	}
}